import { request } from '@/utils/request.js'

/**
 * 客户流水--应收 API JS
 */

export default {

  /**
   * 获取客户流水--应收分页列表
   * @returns
   */
  getList (params = {}) {
    return request({
      url: 'finance/customerFee/index',
      method: 'get',
      params
    })
  },

  /**
   * 添加客户流水--应收
   * @returns
   */
  save (data = {}) {
    return request({
      url: 'finance/customerFee/save',
      method: 'post',
      data
    })
  },
  //批量添加
  saveBatch (id,data = {}) {
    return request({
      url: 'finance/customerFee/saveBatch/'+id,
      method: 'post',
      data
    })
  },

  /**
   * 将客户流水--应收删除，有软删除则移动到回收站
   * @returns
   */
  deletes (data) {
    return request({
      url: 'finance/customerFee/delete',
      method: 'delete',
      data
    })
  },

  /**
   * 读取客户流水--应收
   * @returns
   */
  read (id) {
    return request({
      url: 'finance/customerFee/read/' + id,
      method: 'get',
    })
  },

  /**
   * 更新客户流水--应收数据
   * @returns
   */
  update (data = {}) {
    return request({
      url: 'finance/customerFee/update/' + data.id,
      method: 'put',
      data
    })
  },

  /**
   * 从回收站获取客户流水--应收数据列表
   * @returns
   */
  getRecycleList (params = {}) {
    return request({
      url: 'finance/customerFee/recycle',
      method: 'get',
      params
    })
  },

  /**
   * 恢复客户流水--应收数据
   * @returns
   */
  recoverys (data) {
    return request({
      url: 'finance/customerFee/recovery',
      method: 'put',
      data
    })
  },

  /**
   * 真实删除客户流水--应收
   * @returns
   */
  realDeletes (data) {
    return request({
      url: 'finance/customerFee/realDelete',
      method: 'delete',
      data
    })
  },

  /**
   * 客户流水--应收导出
   * @returns
   */
  exportExcel (params = {}) {
    return request({
      url: 'finance/customerFee/export',
      method: 'post',
      responseType: 'blob',
      params
    })
  },
  /**
   * 放入 账单
   * @returns
   */
  billIn (data = {}) {
    return request({
      url: 'finance/customerFee/bill/in',
      method: 'post',
      data
    })
  },
  /**
   * 拿出 账单
   * @returns
   */
  billOut (data = {}) {
    return request({
      url: 'finance/customerFee/bill/out',
      method: 'post',
      data
    })
  },
  /**
   * 通过审计
   * @returns
   */
  auditPass (data = {}) {
    return request({
      url: 'finance/customerFee/audit/pass',
      method: 'post',
      data
    })
  },
  /**
   * 反审计
   * @returns
   */
  auditRefuse (data = {}) {
    return request({
      url: 'finance/customerFee/audit/refuse',
      method: 'post',
      data
    })
  },

  remote (data = {}) {
    return request({
      url: 'finance/customerFee/remote',
      method: 'post',
      data
    })
  },
}